<?php
    include("site/checklogin.php");
    include("site/scripts.php");
    include("site/header.php");
    include("site/leftcolumn.php");
    
    $xtpl_index   = new XTemplate("view/index.htm");
    $module       = $_GET['module'];
    switch($module){
        case    'edit'  :   include("site/product/edit.php"); break;
        case    'add'   :   include("site/product/add.php"); break;
        case    'del'   :   include("site/product/del.php"); break;
        case    'show'  :   include("site/product/show.php"); break;
        default         :   include("site/product/list.php"); break;
    }
    
    $xtpl_index   -> assign('title', $title);
    $xtpl_index   -> assign('scripts', $scripts);
    $xtpl_index   -> assign('header', $header);
    $xtpl_index   -> assign('leftcolumn', $leftcolumn);
    $xtpl_index   -> assign('content', $content);
    $xtpl_index   -> parse("INDEX");
    $xtpl_index   -> out("INDEX") 
?>